<?php 
$show_validator = true;
include TMPL_PATH.'public/header.phtml';
?>
<script type="text/javascript">
<!--
$(function(){
	$.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
	$("#rankname").formValidator({onshow:"请输入等级名",onfocus:"等级名应该为2-20位之间"}).inputValidator({min:2,max:20,onerror:"等级名应该为2-20位之间"});
	$("#discount").formValidator({onshow:"折扣率，例如：如果输入90，表示该会员组可以以商品原价的90%购买（允许包含小数）。",onfocus:"折扣率输入错误，例如：如果输入90，表示该会员组可以以商品原价的90%购买（允许包含小数）。"}).regexValidator({regexp:"decmal1",datatype:"enum",onerror:"折扣率输入错误"});
	$("#min_point").formValidator({onshow:"进入此会员组的最小经验值",onfocus:"请填写一个整数值"}).regexValidator({regexp:"num1",datatype:"enum",onerror:"请填写一个整数值"}).compareValidator({desid:"max_point",operateor:"<",onerror:"最大经验值必须比最小经验值大"});
	$("#max_point").formValidator({onshow:"进入此会员组的最大经验值",onfocus:"请填写一个整数值"}).regexValidator({regexp:"num1",datatype:"enum",onerror:"请填写一个整数值"}).compareValidator({desid:"min_point",operateor:">",onerror:"最大经验值必须比最小经验值大"});
})
//-->
</script>

<div class="pad_10">
<div class="common-form">
<form name="myform" action="__SELF__" method="post" id="myform">
<table width="100%" class="table_form contentWrap">
<tr>
<td width="80">等级名</td> 
<td><input type="text" name="name" value="<?php echo isset($rank['name']) ? $rank['name'] : null;?>" class="input-text" id="rankname"/></td>
</tr>
<tr>
<td>折扣率</td>
<td>
<input type="text" name="discount" value="<?php echo isset($rank['discount']) ? $rank['discount'] : null;?>" class="input-text" id="discount" size="5"/>%
</td>
</tr>
<tr>
<td>最小经验值</td>
<td>
<input type="text" name="min_point" value="<?php echo isset($rank['min_point']) ? $rank['min_point'] : null;?>" class="input-text" id="min_point"/>
</td>
</tr>
<tr>
<td>最大经验值</td>
<td>
<input type="text" name="max_point" value="<?php echo isset($rank['max_point']) ? $rank['max_point'] : null;?>" class="input-text" id="max_point"/>
</td>
</tr>
</table>

    <div class="bk15"></div>
    <input name="id" type="hidden" value="<?php echo isset($rank['id']) ? $rank['id'] : null;?>" />
    <input name="dosubmit" type="submit" value="提交" class="dialog" id="dosubmit" />
</form>
</div>
</div>
</body>
</html>